const rate = (r) => '★★★★★☆☆☆☆☆'.slice(5 - r, 10 - r)
console.log('rate(1) :>> ', rate(1));
console.log('rate(2) :>> ', rate(2));
console.log('rate(3) :>> ', rate(3));
console.log('rate(4) :>> ', rate(4));
console.log('rate(5) :>> ', rate(5));